<%= render(:partial => "manager_header")%>

<%= form_for(@map, :as => :map, :url => {:action => :update_value_map}, :html => {:id => 'tr8n_language_case_form', :method => :post}) do |form| %>
<div id="tr8n_language_case_exception_container" style="border: 1px dotted #ccc; padding:5px;">
    <%= hidden_field_tag :origin, params[:origin] %>
    <%= hidden_field_tag :map_id, @map.id %>
    <%= hidden_field_tag :case_key, @map.keyword %>

    <table cellpadding="0" celspacing="0" style="width:100%">
	  <tr>
	  	  <td></td>
				<td style="font-weight:bold;color:grey;text-align:left;font-size:10px;"><%=trla("Masculine Form")%></td>
        <td style="font-weight:bold;color:grey;text-align:left;font-size:10px;"><%=trla("Feminine Form")%></td>
	  </tr>
    <% tr8n_current_language.cases.each do |lcase| %>
      <tr>
         <td rowspan="2" style="padding:2px;font-size:10px;color:grey;vertical-align:top;">
  			    <div style="font-weight:bold;">
              <%=lcase.native_name%>:
  					</div>	
  					(::<%=lcase.keyword%>)
         </td>
         <td style="padding:2px;vertical-align:top;">
              <%= text_field_tag "map[map][#{lcase.keyword}][male]", @map.gender_value_for(lcase.keyword, 'male'), :style=>"width:120px;padding: 3px 0px;" %>
         </td>
         <td style="padding:2px;vertical-align:top;">
              <%= text_field_tag "map[map][#{lcase.keyword}][female]", @map.gender_value_for(lcase.keyword, 'female'), :style=>"width:120px;padding: 3px 0px;" %>
         </td>
      </tr>
  		<tr>
  			<td colspan="3" style="color:#ccc;padding-bottom:10px;">
           <%=lcase.description%>
  			</td>
  		</tr>
    <% end %>
    </table>

    <div style="padding:5px;">
      <%=link_to(trla("Click here if the cases do not depend on the token gender or the gender is implied in the word itself."), 
            :case_id => params[:case_id], :rule_id => params[:rule_id], 
            :case_key => params[:case_key], :mode => :gender_neutral,
            :origin => params[:origin]
      ) %>
    </div>
    <div style="padding:5px;">
      <%=link_to(trla("Click here if this word is not an exceptional case and can be configured using rules."), 
                :case_id => params[:case_id], :rule_id => params[:rule_id], 
                :case_key => params[:case_key], :mode => :rules_based, :reset => true,
                :origin => params[:origin]  
      )%>
    </div>

    <div id="tr8n_language_cases_buttons" style="text-align:center;padding:10px;">
        <button type="submit" class="translator_btn translator_submit_btn" onClick="Tr8n.Effects.hide('tr8n_language_case_exception_container');Tr8n.Effects.show('tr8n_language_case_submit_spinner');resizeFrame();Tr8n.Effects.submit('tr8n_language_case_form'); return false;">
            <span><%=trla("Save")%></span>
        </button>
    </div>

</div>
<% end %>    


